<!-- 内部委托-结构化管控分析表 珠宝 -->
<template>
	<mostDrawer :isShow="isShow" :isReadOnly="isReadOnly" :handleType="handleType" :currentRow="currentRow" :tableHeaderList="tableHeaderList" :noFormatColNumList="noFormatColNumList" :levelThirdRowList="levelThirdRowList" @close="handleClose" :rowClassName="rowClassName"></mostDrawer>
</template>

<script setup>
	import { ref } from 'vue';
	import { setOrder } from '@/utils/publicUtils';
	import mostDrawer from '../components/mostDrawer.vue';
	defineProps({
		isShow: { type: Boolean, default: false },
		isReadOnly: { type: Boolean, default: true },
		handleType: { type: String, default: '' },
		currentRow: { type: Object },
	});

	const emit = defineEmits(['close']);
	const noFormatColNumList = ref([0, 1]);
	const levelThirdRowList = ref([2,3,4,5,6,7,8])

	//关闭抽屉
	const handleClose = data => {
		emit('close', data);
	};

	let tableHeaderList = ref([{ label: '序号', isTxt: true }, { label: '科目', isTxt: true }, { label: '预算' }, { label: '实际' }, { label: '完成率', unit: '%' }, { label: '实际比例', unit: '%' }, { label: '管控标准', unit: '%' }]);

	//表格颜色
	const rowClassName = data => {
		if ([0, 1, 9, 10, 11].includes(data.rowIndex)) {
			return 'bg-color-eef4fe';
		}
		return '';
	};

	setOrder(tableHeaderList.value);
</script>
